home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / AmigaTalk / general / Magnitude.st < prev    next >
Text File  |  2000-02-13  |  502b  |  30 lines

  1. Class Magnitude :Object
  2. [
  3.    <= arg
  4.       ^ (self < arg) or: [self = arg]
  5. |   
  6.    < arg
  7.       ^ (arg > self)
  8. |   
  9.    = arg
  10.       ^ (self > arg or: [self < arg]) not
  11. |   
  12.    ~= arg
  13.       ^ (self = arg) not
  14. |   
  15.    >= arg
  16.       ^ (self > arg) or: [self = arg]
  17. |   
  18.    > arg
  19.       ^ arg < self
  20. |   
  21.    between: low and: high
  22.       ^ (self >= low) and: [self <= high]
  23. |   
  24.    min: arg
  25.       ^ (self < arg) ifTrue: [self] ifFalse: [arg]
  26. |   
  27.    max: arg
  28.       ^ (self > arg) ifTrue: [self] ifFalse: [arg]
  29. ]
  30.